<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>收货地址</title>
		<script type="text/javascript">
		var getCartDataUrl = "<?php echo U('getCartData');?>";
		var delCartUrl = "<?php echo U('Cart/del');?>";
		</script>
		
		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<link rel="stylesheet" type="text/css" href="http://localhost/vshop/Template/default/css/public.css"/>
		<script src="http://localhost/vshop/Template/default/js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="http://localhost/vshop/Template/default/js/public.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="http://localhost/vshop/Template/default/css/memberPublic.css"/>
		<link rel="stylesheet" type="text/css" href="http://localhost/vshop/Template/default/css/address.css"/>
		<script type="text/javascript" src="http://localhost/vshop/Template/default/js/address.js"></script>
		<script type="text/javascript">
		var s = ["ProvinceID","CityID","AreaID"];
		var opt0 = ["请选择省","请选择市","请选择县（区）"];
		function setup(){
			for(i=0;i<s.length-1;i++) document.getElementById(s[i]).onclick=new Function("change("+(i+1)+")");
			change(0);
		}
		$(function(){
			setup();
			//$('#addressForm').submit(function(){
				//var dj = $('#ProvinceID').val() + '省,' + $('#CityID').val() + '市,' + $('#s3').val();
				//alert(dj);	
			//});
			var addressBoxH = true;
			$("#btnToogleAddAddressDiv").click(function(){
				if(addressBoxH){
					$(".edit-addrNew").show();
					addressBoxH = false;
				}else{
					$(".edit-addrNew").hide();
					addressBoxH = true;
				}
			});
		});
		</script>
	</head>
	<body>
		<!-- 头部开始 -->
		<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!-- 头部开始 -->
		<div class="haad">
			<div class="haadTop">
				    <?php if(session('uid') && session('uname')){ ?>
					<div class="haadTopL">
						您好，<a href="<?php echo U('Member/index');?>" style="color: #A10000;"><?php echo $hd['session']['uname'];?></a>&nbsp;
						<span>欢迎光临凡客诚品！</span>&nbsp;
						<a href="<?php echo U('User/out');?>" style="color: #A10000;">退出登陆</a>
					</div>
				<?php }else{ ?>
					<div class="haadTopL">
						您好，<span>欢迎光临凡客诚品！</span>&nbsp;
						<span>
							<a href="<?php echo U('User/login');?>">登陆</a>&nbsp;|&nbsp;<a href="<?php echo U('User/register');?>">注册</a>
						</span>
					</div>
				<?php } ?>
				<div class="haadTopR">
					<ul>
						<li class="topMenuBox">
							<a href="<?php echo U('Member/index');?>" class="topMenu">我的凡客</a>
							<ul>
								<li><a href="#">我的订单</a></li>
							</ul>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<!--logo和搜索开始-->
		<div class="logoSearch">
			<div class="logoL">
				<a href="<?php echo U('Index/index');?>"></a>
			</div>
			<div class="searchR">
				<div class="searchFormBox">
					<form action="" method="post">
						<input type="text" id="keyword" value="搜“帆布鞋”，体验与众不同" /><input type="submit" id="searchSub" value="" />
					</form>
				</div>
				<div class="cartBox">
					<p><a href="#">购物车(<span>0</span>)</a></p>
					<div class="BuycarTab">
						<div id="noGoodsMsg" style="display: none;">您的购物车中没有商品</div>
						<div class="havepru">
							<h2>最近加入的商品：</h2>
							<ul>
								
							</ul>
							<div class="ShopCarPageLine"></div>
							<div class="ShopCarPage">
								<div>共计(未计算促销折扣)<span>￥0</span></div>
								<strong><a href="<?php echo U('Cart/index');?>">查看购物车(<span>0</span>件)</a></strong>
							</div>
						</div>
					</div>
				</div>
				<div class="hotWord">
					<p>热门搜索：<a href="#">吉国武</a>&nbsp;<a href="#">吉国武</a></p>
				</div>
			</div>
		</div>
		<!--logo和搜索结束-->
		<!--顶部导航开始-->
		<div class="navBox">
			<div class="allProduct">
				<span class="navCon notIndex">全部商品分类<em></em></span>
				<div class="categoryList">
					<div class="categpost">
						<?php foreach ($topCate as $tk=>$tv){?>
							<dl>
								<h3><a href="<?php echo U('List/index',array('cid'=>$tv['cid']));?>"><?php echo $tv['cname'];?></a></h3>
								<?php foreach ($cateData as $ck=>$cv){?>
									    <?php if($tv['cid']==$cv['pid']){ ?>
										<dt><a href="<?php echo U('List/index',array('cid'=>$cv['cid']));?>"><?php echo $cv['cname'];?></a></dt>
										<dd>
											<?php foreach ($cateData as $sk=>$sv){?>
												    <?php if($cv['cid']==$sv['pid']){ ?>
													<a href="<?php echo U('List/index',array('cid'=>$sv['cid']));?>"><?php echo $sv['cname'];?></a>
												<?php } ?>
											<?php }?>
										</dd>
									<?php } ?>
								<?php }?>
							</dl>
						<?php }?>
					</div>
				</div>
			</div>
			<div class="navListBox">
				<ul>
					<?php foreach ($topCate as $k=>$v){?>
						<li><a href="<?php echo U('List/index',array('cid'=>$v['cid']));?>"><?php echo $v['cname'];?></a></li>
					<?php }?>
				</ul>
			</div>
		</div>
		<!--顶部导航结束-->
		<!-- 头部结束 -->
		<!-- 头部结束 -->
		<dl class="wrapper">
			<dl id="position">
				<dt>您当前的位置：<a href="#">凡客首页</a></dt>
				<dd> &gt; <a href="">我的凡客</a></dd>
				<dd> &gt; <a href="">收货地址</a></dd>
			</dl>
			<!--left menu start-->
			<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<div id="side-nav">
				<div class="my_vancl">
					<h2><a href="" class="track" name="my-left-left-commorder">我的凡客</a></h2>
				</div>
				<ul class="">
					<li><h3>订单中心</h3></li>
					<li class="no_bg"><a href="" class="track">·我的订单</a></li>
				</ul>
				<ul class="">
					<li><h3>客户服务</h3></li>
					<li><a href="" class="track">·我要评价</a></li>
					<li><a href="" class="track">·商品提问</a></li>
				</ul>
				<ul class="service-rate">
					<li><h3>账户管理</h3></li>
					<li><a href="" class="track">·账户余额</a></li>
					<li><a href="<?php echo U('Address/index');?>" class="track">·收货地址</a></li>
					<li><a href="<?php echo U('SaveCenter/index');?>" class="track">·账户安全</a></li>
					<li><a href="<?php echo U('SaveCenter/userInfo');?>" class="track">·我的资料</a></li>
				</ul>
			</div>
			<!--left menu end-->
			<div class="ordercontainer">
				<h3><span>收货地址</span></h3>
				<div class="blank10"></div>
				<span class="blank10"></span>
				<div class="content">
		            <div id="dizhi_list">
		                <table class="list addr-list addr-listNew" style="table-layout:fixed; width:100%;">
		                    <tbody>
			                    <tr>
			                        <th class="consignee">收货人</th>
			                        <th class="addr-detail">详细地址</th>
			                        <th class="phone">手机</th>
			                        <th class="operate">操作</th>
			                    </tr>
			                        <?php if(empty($arData)){ ?>
			                        <tr>
			                            <td colspan="4" align="center">您还未保存收货地址</td>
			                        </tr>
		                        <?php }else{ ?>
		                        	<?php foreach ($arData as $ark=>$arv){?>
		                        		<tr>
		                        			<td><?php echo $arv['ieceovername'];?></td>
		                        			<td><?php echo $arv['area'];?></td>
		                        			<td><?php echo $arv['arphone'];?></td>
		                        			<td><a href="<?php echo U('delArea',array('arid'=>$arv['arid']));?>">删除</a></td>
		                        		</tr>
		                        	<?php }?>
		                        <?php } ?>
		                	</tbody>
		                </table>
		                <input id="currentPageNum" value="0" type="hidden">
		            </div>
            		<a name="A2"></a>
		            <div class="Addtitle AddAdresstitle">
		                <h3 style="cursor: pointer;" id="btnToogleAddAddressDiv" class="addNewAdress AddNewAdressArrowUp">
		                	添加新地址
		                </h3>
		            </div>
		            <form action="<?php echo U('add');?>" method="post" id="addressForm">
			            <fieldset class="edit-addr edit-addrNew" style="margin: 13px 35px; ">
			                <div id="AddAddressDiv" style="">
			                	<div class="new_dizhi">
								    <table border="0" cellpadding="10" cellspacing="3" width="100%">
								        <tbody>
								            <tr>
								                <td width="73"><span>*</span>收货人：</td>
								                <td colspan="3">
								                    <input id="receiverName" name="ieceovername" type="text" />
								                </td>
								            </tr>
								            <tr>
								                <td width="70"></td>
								                <td colspan="3"><b id="receiverNameError" class="addressEdit">请填写收货人</b></td>
								            </tr>
								            <tr>
								                <td style="padding-top: 4px;" valign="top"><span>*</span>地区：</td>
								                <td colspan="6">
								                    <table border="0" cellpadding="0" cellspacing="1">
								                        <tbody>
								                        	<tr>
									                            <td>
									                                <select name="ProvinceID" id="ProvinceID">
									                                    <option value="">--省份/直辖市--</option>
									                                </select>
									                            </td>
									                            <td>
									                                <select name="CityID" id="CityID">
									                                    <option value="">--市--</option>
									                                </select>
									                            </td>
									                            <td>
									                                <select name="AreaID" id="AreaID">
									                                    <option value="">--县/区--</option>
									                                </select>
									                            </td>
								                        	</tr>
									                        <tr>
									                            <td width="">
									                                <b id="provinceError" class="addressEdit" style="margin-left: 0; margin-top: 2px;">请选择省份</b>
									                            </td>
									                            <td width="">
									                                <b id="cityError" class="addressEdit" style="margin-left: 0px; margin-top: 2px;">请选择市</b>
									                            </td>
									                            <td width="">
									                                <b id="areaError" class="addressEdit" style="margin-left: 0px; margin-top: 2px;">请选择县/区</b>
									                            </td>
									                        </tr>
								                    	</tbody>
								                    </table>
								                </td>
								            </tr>
								            <tr>
								                <td><span>*</span>详细地址：</td>
								                <td colspan="3">
								                    <input id="detailAddress" name="detailarea" type="text">
								                    <!-- <span class="hei"><a href="" target="_blank">配送范围与配送时间 </a></span> -->
								                </td>
								            </tr>
								            <tr>
								                <td></td>
								                <td colspan="3"><b id="detailAddressError" class="addressEdit">请填写详细路名及门牌号</b></td>
								            </tr>
								            <tr>
								                <td><span>*</span>邮政编码：</td>
								                <td colspan="3">
								                	<input id="postalCode" maxlength="6" name="postalcode" type="text" />
								                	<span id="SetPostalCode"></span>
								                </td>
								            </tr>
								            <tr>
								                <td></td>
								                <td colspan="3"><b id="postalCodeError" class="addressEdit">请填写邮政编码</b></td>
								            </tr>
								            <tr>
								                <td><span>*</span>手机：</td>
								                <td colspan="3">
								                	<input id="phone" name="arphone" type="text" />
								                	<span id="SetPostalCode"></span>
								                </td>
								            </tr>
								            <tr>
								                <td></td>
								                <td colspan="3"><b id="postalCodeError" class="addressEdit">请填写手机</b></td>
								            </tr>
							                <tr>
							                    <td><span></span></td>
							                    <td colspan="3">
								                    <p style="margin: 10px 0px 15px 0;">
									                    <input id="isDefaultAddress" name="arisdefault" value="1" style="border:0;" type="checkbox" />
									                    <span style="">设置为默认收货地址</span>
								                    </p>
							                    </td>
							                </tr>
								            <tr>
								                <td style="padding-top: 6px;" valign="top"><span>&nbsp;</span></td>
								                <td colspan="6">
									                <p><input type="submit" value="添加收货地址" /></p>
									            </td>
								            </tr>
								        </tbody>
								    </table>
								</div>
			                </div>
			            </fieldset>
		            </form>
				</div>
			</div>
		</div>
		<div style="width: 100%;height: 20px;clear: both;"></div>
		<div class="copyRight">
			<div class="copyRightTab"><p>Copyright 2007 - 2014 vancl.com All Rights Reserved 京ICP证100557号 京公网安备11011502002400号 出版物经营许可证新出发京批字第直110138号</p></div>
		</div>
	</body>
</html>
